﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPushButton>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class People
{
public:
    People();
    void setName(QString name);
    void setAge(int age);

    QString getName()const;
    int getAge()const;

private:
    QString name;
    int age;
};

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

//private slots:
//    void test();

//private slots:
//    void on_lineEdit_textChanged(const QString &arg1);

signals:
    void signal(const QString &);

    void my_signal(People &p);



private slots:
    void on_pushButton_clicked();

    void sentSIGNAL();

    void slotFunc(People&p);

private:
    Ui::MainWindow *ui;
    QPushButton*pBtn;


};
#endif // MAINWINDOW_H
